import { _decorator } from "cc";
import { JNSyncMessage } from "../../../../../extensions/ngame/assets/ngame/sync/JNSyncMessage";
import { JNGSyncProtoBase } from "../App";
import { JNFrameInfo } from "../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
const { ccclass, property } = _decorator;

interface WorldMainInput{
    message?:string;
}


@ccclass('WorldMain')
export default class WorldMain extends JNGSyncProtoBase<WorldMainInput> {

    onSyncUpdate(dt: number,frame:JNFrameInfo, input?: WorldMainInput): void {
        if(input){
            // console.log(input.message)
        }
    }

    protected update(dt: number): void {
        this.input.message = "Hello Input";
    }

    getClassName(): string {
        return JNSyncMessage.JNInput
    }

}

